<?php
$all_items = &$Planet->getItems();
$limit = $PlanetConfig->getMaxDisplay();
$count = 0;
?>
<rdf:RDF
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
    xmlns:admin="http://webns.net/mvcb/"
    xmlns:cc="http://web.resource.org/cc/"
    xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns="http://purl.org/rss/1.0/">

    <channel rdf:about="<?php echo $PlanetConfig->getUrl(); ?>">
        <title><?php echo $PlanetConfig->getName(); ?></title>
        <description></description>
        <link><?php echo $PlanetConfig->getUrl(); ?></link>
        <dc:language></dc:language>
        <dc:creator></dc:creator>
        <dc:rights></dc:rights>
        <dc:date><?php echo date('Y-m-d\\TH:i:s+00:00'); ?></dc:date>
        <admin:generatorAgent rdf:resource="http://moonmoon.inertie.org/" />
    
        <items>
        <rdf:Seq>
            <?php foreach ($all_items as $item): ?>
            <rdf:li rdf:resource="<?php echo $item->getUrl();?>"/>
            <?php if (++$count == $limit) { break; } ?>
            <?php endforeach; ?>
        </rdf:Seq>
        </items>
    </channel>
    
    <?php $count = 0; ?>
    <?php foreach ($all_items as $item): ?>
    <item rdf:about="<?php echo $item->getUrl();?>">
        <title><?php echo htmlspecialchars($item->getAuthor()) ?> : <?php echo htmlspecialchars($item->getTitle());?></title>
        <link><?php echo htmlspecialchars($item->getUrl());?></link>
        <dc:date><?php echo date('Y-m-d\\TH:i:s+00:00',$item->getDate()); ?></dc:date>
        <dc:language>fr</dc:language>
        <dc:creator><?php echo htmlspecialchars($item->getAuthor()) ?></dc:creator>
        <dc:subject></dc:subject>
        <description><?php echo htmlspecialchars($item->getContent()); ?></description>
        <content:encoded><![CDATA[<?php echo $item->getContent();?>]]></content:encoded>
    </item>
    <?php if (++$count == $limit) { break; } ?>
    <?php endforeach; ?>
    
</rdf:RDF>